<?php

class Default_ResultatController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
    	$grandprixDAO = new Application_Model_GrandprixDAO();
        $this->view->grandprix = $grandprixDAO->findAll();
    }
	
    public function showAction()
    {
    	$id = $this->getRequest()->getParam('id');
    	$grandprixDAO = new Application_Model_GrandprixDAO();
    	$pointsDAO = new Application_Model_PointsDAO();
    	$this->view->id = $id;
    	$this->view->grandprix = $grandprixDAO->findAll();
    	$this->view->gp = $grandprixDAO->find((int)$id);
    	$this->view->points = $pointsDAO->findAll();
    }
}

